Sponsored content (e.g., advertisements) can be included in a resource that is distributed on the Internet. Such sponsored content can be stored in a repository and can be associated with words and phrases, which are referred to herein as “item terms.” A selection engine can be used to determine which sponsored content to provide to a resource. A conventional selection engine receives a set of keywords, a resource identifier such as a uniform resource locator (URL) or other information (hereinafter just “query terms”) as an input. The selection engine in turn selects sponsored content from the repository that matches the provided query terms.
The query terms used to select sponsored content may come from a variety of sources. In some implementations, the query terms are derived from a target resource (e.g., document), which will ultimately be modified to contain the sponsored content. Content of the target resource can be analyzed to identify one or more words or phrases. Such words or phrases can be further processed to generate a set of related words or phrases, such as synonyms. Other information associated with the resource, such as a uniform resource locator (URL) or other information, also can be processed to generate another set of words or phrases. Other words that can be used as query terms include histories of queries that have been used to access the resource. A resource also can have words defining a category to which the resource belongs. These multiple sets of words and phrases can be used as query terms for accessing sponsored content.
The selection engine can apply a matching operation between the sets of query terms and the item terms associated with sponsored content in the repository to select a sponsored content item. The result of the matching operation for an item of sponsored content can be information describing the query terms which matched item terms of the item of sponsored content, and the set of query terms in which the matching query terms reside. From this information, a numerical score for the item of sponsored content can be generated and used to to select items of sponsored content for inclusion with a given resource.